<?php
	$this->load->helper("form");
	$url = $this->config->item('base_url');
	$currentlang = $this->lang->languageCode();
	echo form_open($url.$currentlang.'/search/',array("method" => "get"));
?>
<div class="main-page-content search-content">
<span>
	<label><?php echo $this->lang->line('lang.search.label');?></label>
</span>
<span>
	<input type="text" name="trucknumber" class="default-field-focus" size="20" value="<?php if(isset($trucknumber)){echo $trucknumber;}?>"/>
</span>
<span>
	<input type="submit" value="<?php echo $this->lang->line('lang.search.button');?>" class="button-submit" />
</span>

<div class='search-result-zone'>
<?php
	if(isset($paginator) && isset($count) && $count > 0){
		echo "<div class='search-result-title'>".$this->lang->line('lang.search.resulttitle')."</div>";
		echo $this->table->generate($records);
		echo "<div class='paginator'>".$paginator."</div>";
	} else if(isset($count) && $count == 0) {
		echo "<div class='search-noresult'>".$this->lang->line('lang.search.noresult')."</div>";
	}
	
?>
</div>
</form>
</div>
<script type='text/javascript'>
			(function(){
				document.getElementsByClassName('default-field-focus')[0].focus();
			})();
		</script>